/* 
* File: vector_at.cpp
* 测试用例修改自 http://www.cplusplus.com/reference/stl/vector/vector/clear/
* 编译命令：
* 	c++ -Wall -g  -I ../Include/ vector_clear.cpp -o vector_clear 
* 在这里假设所有的所需的头文件放在../Include里面
*/
// clearing vectors
#include <iostream>
//#include <vector>
#define vector Vector
#include "Vector.h"
using namespace std;

int main ()
{
	unsigned int i;
	vector<int> myvector;
	myvector.push_back (100);
	myvector.push_back (200);
	myvector.push_back (300);

	cout << "myvector contains:";
	for (i=0; i<myvector.size(); i++) cout << " " << myvector[i];

	myvector.clear();
	cout << endl << myvector.capacity() << endl;
	myvector.push_back (1101);
	myvector.push_back (2202);

	cout << "\nmyvector contains:";
	for (i=0; i<myvector.size(); i++) cout << " " << myvector[i];

	cout << endl << myvector.capacity() << endl;

	return 0;
}
